MAP PROJECTIONS

Hilary Dugan
Feb 9, 2017


all projections and how to code them in R

Why maps are wrong

VOX video

  • Surface of the Earth cannot be represented as a plane without distortion
  • Projections are just algorithms to move from sphere to plane
  • Maps are data visualization at its best

Plotting maps in R

install.packages('maps')
library(maps)
map(database = "world", 
  regions = ".", 
  exact = FALSE, 
  boundary = TRUE,
  interior = TRUE, 
  projection = "", 
  parameters = NULL, 
  orientation = NULL,
  fill = FALSE, 
  ...)

Plotting maps in R

 ?map
  • database: string
    • 'world', 'usa', 'state'
  • regions: string vector of regions in database
    • 'Canada' or 'California'
  • projection: see ?mapproject
  • parameters: see ?mapproject

Plotting maps in R

 ?map
  • orientation: where the map should be centered
    • c(latitude, longitude, rotation)
  • fill: draw lines or fill area
    • TRUE or FALSE
  • wrap: lines that cross too far across the map (due to a strange projection) are omitted*
    • TRUE or FALSE

Plotting maps in R

 ?map
  • xlim: range of longitudes
    • c(40,60)
  • ylim: range of latitudes
  • mar: default margins allow for axes
    • c(0,0,0,0)
  • res: resolution of map

Plotting maps in R

map('world',col='red3',mar=c(0,0,0,0)) #Default is albers equal-area

plot of chunk unnamed-chunk-6

Plotting maps in R

map('world', regions = c('Canada','Antarctica'), add=T, col='grey50', fill = T, border=F)

plot of chunk unnamed-chunk-8

Plotting maps in R

map('state', col='red3', mar=c(0,0,0,0))
map('state', regions = c('Wisconsin','California'), add=T, col='grey50', fill = T, border=F)

plot of chunk unnamed-chunk-9

Types of Projections


By surface

  • Cylindrical
  • Pseudocylindrical
  • Conic
  • Azimuthal


By property

  • Conformal
    • preserve angles locally
  • Equal-area
  • Equidistant
  • Gnomonic
    • Great circles are straight lines
  • or Compromise (Robinson or Winkel-Tripel)

Cylindrical Map Projections


  • Straight coordinate lines
  • Horizontal parallels crossing vertical meridians at right angles
  • Can change scale used when spacing the parallel lines



text - Mercator, Behrmann, Gall-Peters

Maps - cylindrical equal-area (Lambert)

map('world', col='red3', proj='cylequalarea', parameters=0, wrap=T,fill=T) # Lambert

N-S compression = cosine of the latitude (reciprocal of E-W stretching). Preserves area. plot of chunk unnamed-chunk-11

Maps - cylindrical equal-area (Gall-Peters)

map('world', col='red3', proj='cylequalarea', parameters=45, wrap=T,fill=T) # Gall-Peters

N-S compression = cosine of the latitude (reciprocal of E-W stretching). Preserves area. plot of chunk unnamed-chunk-13

Pseudocylindrical Projections


  • Central meridian is a straight line
  • Other meridians bow outward
  • Parallels are straight lines



text

Pseudocylindrical in R - Mollweide (World)

map('world', col='red3', proj='mollweide', res=0, fill=T, orientation = c(90,0,0))

plot of chunk unnamed-chunk-14

Conic Projections


  • Meridians are mapped to equally spaced lines radiating from apex
  • Latitudes are mapped to circular arcs centered on the apex
  • Pick two standard parallels
    • Where cone intersects globe
    • Low distortion in scale, shape, and area near standard parallels
  • Best suited regional maps


text

Conic Map Projections

  • Equidistant conic
    • parallels evenly spaced along the meridians
    • preserves a constant distance scale along each meridian
  • Albers conic
    • adjusts the N-S distance between non-standard parallels to compensate for the E-W stretching or compression
    • equal-area map
  • Lambert conformal conic
    • adjusts the N-S distance between non-standard parallels to equal the E-W stretching
    • conformal map

Conic - Equidistant conic (World)

map('world', col='red3', proj='simpleconic', parameters=c(20,50), res=0, orientation = c(90,0,0))

plot of chunk unnamed-chunk-15

Conic maps in R - USA

plot of chunk unnamed-chunk-16

Conic maps in R - Albers (USA)

map('state',col='red3',proj='albers',parameters =c(30,50))
map('state',col='red3',proj='albers',parameters =c(10,70),add=T,fill=T)

plot of chunk unnamed-chunk-18

Conic vs. Cylindrical - USA

plot of chunk unnamed-chunk-19

Azimuthal (Planar) Map Projections


  • Mapping of radial lines can be visualized as a plane tangent to the Earth, with the central point as tangent point
  • Great circles through the central point are represented by straight lines on the map



text

Azimuthal (Planar) - Gnomonic

map('world', col='red3', proj='simpleconic', parameters=c(20,50), res=0, orientation = c(90,0,0))

May be the oldest map projection, from 6th century BC plot of chunk unnamed-chunk-20

Plotting the poles


map('world', projection = 'orthographic',orientation = c(90,0,0))

plot of chunk unnamed-chunk-21


map('world', projection = 'orthographic',orientation = c(-90,0,0))

plot of chunk unnamed-chunk-22

Types of Projections


By surface

  • Cylindrical
  • Pseudocylindrical
  • Conic
  • Azimuthal


By property

  • Conformal
    • preserve angles locally
  • Equal-area
  • Equidistant
  • Gnomonic
    • Great circles are straight lines
  • or Compromise (Robinson or Winkel-Tripel)

Tissot's indicatrix


  • Characterize local distortions due to map projection
  • Illustrates linear, angular, and areal distortions of maps
  • Example: Berhmann and Mercator

tissot1 tissot2

Tissot's indicatrix - drawTissot

Can you tell the difference?

all projections

What's next?


  • Add point data
  • Add regional data

salt map

References and Learning Material


xkcd